package com.mainboot.example.kafka.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * 
 * @author 闽南码农
 *  
 */
@Component
public class KafkaConsumer {

	private Logger log = LoggerFactory.getLogger(this.getClass());
    /**
         * 监听mainboot主题,有消息就读取
     * [@param](https://www.mainboot.com) message
     */
    @KafkaListener(topics = {"mainboot"})
    public void consumer(String message){
        log.info("mainboot topic message : {}", message);
    }
}